﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace JwtWebApi.Migrations
{
    public partial class msyql : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "fee_DelegateOrderCostDetail",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    TotalAmount = table.Column<decimal>(nullable: false),
                    Type = table.Column<int>(nullable: false),
                    ConstructionsSetupAmount = table.Column<decimal>(nullable: false),
                    MaterialFee = table.Column<decimal>(nullable: false),
                    VendorMaterialFee = table.Column<decimal>(nullable: false),
                    SecondaryMaterial = table.Column<decimal>(nullable: false),
                    RuleCost = table.Column<decimal>(nullable: false),
                    SafeProduce = table.Column<decimal>(nullable: false),
                    ConstructionCoordination = table.Column<decimal>(nullable: false),
                    ConstructionOccupancy = table.Column<decimal>(nullable: false),
                    SporadicMaterialAndInputInfo = table.Column<decimal>(nullable: false),
                    Supervisor = table.Column<decimal>(nullable: false),
                    Design = table.Column<decimal>(nullable: false),
                    FirstPartyMeterial = table.Column<decimal>(nullable: false),
                    Equipment = table.Column<decimal>(nullable: false),
                    PreConverageDataInput = table.Column<decimal>(nullable: false),
                    MiddleStationJumperDesign = table.Column<decimal>(nullable: false),
                    TransferDataInput = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_DelegateOrderCostDetail", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "fee_Project",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 128, nullable: true),
                    Comment = table.Column<string>(maxLength: 512, nullable: true),
                    No = table.Column<string>(maxLength: 36, nullable: true),
                    CreateYear = table.Column<int>(nullable: false),
                    FirstOrderTime = table.Column<DateTimeOffset>(nullable: true),
                    LastOrderTime = table.Column<DateTimeOffset>(nullable: true),
                    LevelProcess = table.Column<int>(nullable: false),
                    Amount = table.Column<decimal>(nullable: false),
                    ConstructionLimitationComment = table.Column<string>(maxLength: 512, nullable: true),
                    ConstructionContent = table.Column<string>(maxLength: 512, nullable: true),
                    Station = table.Column<int>(nullable: false),
                    YearTargetDesscription = table.Column<string>(maxLength: 128, nullable: true),
                    Status = table.Column<int>(nullable: false),
                    Owner = table.Column<string>(nullable: true),
                    StationType = table.Column<int>(nullable: false),
                    Type = table.Column<int>(nullable: false),
                    SpecialtyPrimaryType = table.Column<int>(nullable: false),
                    SpecialtySecondaryType = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_Project", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "fee_ProjectNumberMapping",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    ShortNo = table.Column<string>(maxLength: 24, nullable: true),
                    No = table.Column<string>(maxLength: 64, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_ProjectNumberMapping", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "fee_ProjectSetting",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    ConstructionType = table.Column<int>(nullable: false),
                    StationType = table.Column<int>(nullable: false),
                    ProjectNumber = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_ProjectSetting", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "fee_Vendor",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 128, nullable: true),
                    Contact = table.Column<string>(maxLength: 24, nullable: true),
                    ContactPhone = table.Column<string>(maxLength: 24, nullable: true),
                    FullName = table.Column<string>(nullable: true),
                    Address = table.Column<string>(maxLength: 64, nullable: true),
                    TaxNumber = table.Column<string>(maxLength: 64, nullable: true),
                    Bank = table.Column<string>(maxLength: 24, nullable: true),
                    BankAccount = table.Column<string>(maxLength: 64, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_Vendor", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "member_District",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 128, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_District", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "member_role",
                columns: table => new
                {
                    Id = table.Column<string>(maxLength: 36, nullable: false),
                    Name = table.Column<string>(maxLength: 256, nullable: true),
                    NormalizedName = table.Column<string>(maxLength: 256, nullable: true),
                    ConcurrencyStamp = table.Column<string>(nullable: true),
                    Description = table.Column<string>(maxLength: 100, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_role", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "wf_WorkProcess",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 24, nullable: true),
                    WorkflowType = table.Column<string>(maxLength: 32, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wf_WorkProcess", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "fee_FwContract",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 128, nullable: true),
                    No = table.Column<string>(maxLength: 128, nullable: true),
                    ContractType = table.Column<int>(nullable: false),
                    VendorId = table.Column<int>(nullable: true),
                    Amount = table.Column<decimal>(nullable: false),
                    AmountWithoutTax = table.Column<decimal>(nullable: false),
                    ReductionAmount = table.Column<decimal>(nullable: false),
                    Status = table.Column<int>(nullable: false),
                    SignTime = table.Column<DateTimeOffset>(nullable: true),
                    ExpireTime = table.Column<DateTimeOffset>(nullable: true),
                    Comment = table.Column<string>(maxLength: 256, nullable: true),
                    ContractDescription = table.Column<string>(maxLength: 256, nullable: true),
                    EffectYear = table.Column<string>(maxLength: 32, nullable: true),
                    NetType = table.Column<string>(maxLength: 32, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_FwContract", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_FwContract_fee_Vendor_VendorId",
                        column: x => x.VendorId,
                        principalTable: "fee_Vendor",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_Station",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    DistrictId = table.Column<int>(nullable: true),
                    OrderDistrictId = table.Column<int>(nullable: true),
                    Code = table.Column<string>(maxLength: 128, nullable: true),
                    Type = table.Column<int>(nullable: false),
                    Status = table.Column<int>(nullable: false),
                    ThirdStationStatus = table.Column<string>(nullable: true),
                    SyncTime = table.Column<DateTimeOffset>(nullable: false),
                    CreateTime = table.Column<DateTimeOffset>(nullable: true),
                    IsVip = table.Column<int>(nullable: false),
                    UsersNumber = table.Column<int>(nullable: false),
                    Name = table.Column<string>(maxLength: 128, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_Station", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_Station_member_District_DistrictId",
                        column: x => x.DistrictId,
                        principalTable: "member_District",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_Station_member_District_OrderDistrictId",
                        column: x => x.OrderDistrictId,
                        principalTable: "member_District",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_vendorMatcher",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    DistrictId = table.Column<int>(nullable: true),
                    ConstructionType = table.Column<int>(nullable: false),
                    Year = table.Column<int>(nullable: false),
                    VendorId = table.Column<int>(nullable: true),
                    ContractType = table.Column<string>(nullable: false),
                    discriminator = table.Column<string>(nullable: false),
                    StationType = table.Column<int>(nullable: true),
                    IsVip = table.Column<bool>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_vendorMatcher", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_vendorMatcher_member_District_DistrictId",
                        column: x => x.DistrictId,
                        principalTable: "member_District",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_vendorMatcher_fee_Vendor_VendorId",
                        column: x => x.VendorId,
                        principalTable: "fee_Vendor",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "member_user",
                columns: table => new
                {
                    Id = table.Column<string>(maxLength: 36, nullable: false),
                    UserName = table.Column<string>(maxLength: 256, nullable: true),
                    NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
                    Email = table.Column<string>(maxLength: 256, nullable: true),
                    NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
                    EmailConfirmed = table.Column<int>(nullable: false),
                    PasswordHash = table.Column<string>(nullable: true),
                    SecurityStamp = table.Column<string>(nullable: true),
                    ConcurrencyStamp = table.Column<string>(nullable: true),
                    PhoneNumber = table.Column<string>(nullable: true),
                    PhoneNumberConfirmed = table.Column<int>(nullable: false),
                    TwoFactorEnabled = table.Column<int>(nullable: false),
                    LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
                    LockoutEnabled = table.Column<int>(nullable: false),
                    AccessFailedCount = table.Column<int>(nullable: false),
                    Name = table.Column<string>(maxLength: 36, nullable: true),
                    DistrictId = table.Column<int>(nullable: true),
                    VendorId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_user", x => x.Id);
                    table.ForeignKey(
                        name: "FK_member_user_member_District_DistrictId",
                        column: x => x.DistrictId,
                        principalTable: "member_District",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_member_user_fee_Vendor_VendorId",
                        column: x => x.VendorId,
                        principalTable: "fee_Vendor",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "member_role_claim",
                columns: table => new
                {
                    Id = table.Column<int>(maxLength: 36, nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    RoleId = table.Column<string>(nullable: false),
                    ClaimType = table.Column<string>(nullable: true),
                    ClaimValue = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_role_claim", x => x.Id);
                    table.ForeignKey(
                        name: "FK_member_role_claim_member_role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "member_role",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "wf_WorkTask",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 32, nullable: true),
                    RoleId = table.Column<string>(nullable: true),
                    CanEdit = table.Column<bool>(nullable: false),
                    CanReject = table.Column<bool>(nullable: false),
                    CanGiveUp = table.Column<bool>(nullable: false),
                    Ordered = table.Column<int>(nullable: false),
                    DefaultResolveComment = table.Column<string>(maxLength: 64, nullable: true),
                    Discriminator = table.Column<string>(nullable: false),
                    WorkProcessId = table.Column<int>(nullable: true),
                    CanChangedDesigner = table.Column<bool>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wf_WorkTask", x => x.Id);
                    table.ForeignKey(
                        name: "FK_wf_WorkTask_member_role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "member_role",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_wf_WorkTask_wf_WorkProcess_WorkProcessId",
                        column: x => x.WorkProcessId,
                        principalTable: "wf_WorkProcess",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_OrderContract",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    OrderNo = table.Column<string>(maxLength: 48, nullable: true),
                    ContractNo = table.Column<string>(maxLength: 24, nullable: true),
                    Name = table.Column<string>(maxLength: 256, nullable: true),
                    Amount = table.Column<decimal>(nullable: false),
                    AmountWithoutTax = table.Column<decimal>(nullable: false),
                    ProjectId = table.Column<int>(nullable: true),
                    FrameworkContractId = table.Column<int>(nullable: true),
                    Tax = table.Column<decimal>(nullable: false),
                    Status = table.Column<int>(nullable: false),
                    SignTime = table.Column<DateTimeOffset>(nullable: false),
                    FinishTime = table.Column<DateTimeOffset>(nullable: true),
                    VendorId = table.Column<int>(nullable: true),
                    Comment = table.Column<string>(maxLength: 256, nullable: true),
                    Contact = table.Column<string>(maxLength: 128, nullable: true),
                    ProjectNo = table.Column<string>(maxLength: 32, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_OrderContract", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_OrderContract_fee_FwContract_FrameworkContractId",
                        column: x => x.FrameworkContractId,
                        principalTable: "fee_FwContract",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_OrderContract_fee_Project_ProjectId",
                        column: x => x.ProjectId,
                        principalTable: "fee_Project",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_OrderContract_fee_Vendor_VendorId",
                        column: x => x.VendorId,
                        principalTable: "fee_Vendor",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_ConstTask",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    StationId = table.Column<int>(nullable: true),
                    Status = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_ConstTask", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_ConstTask_fee_Station_StationId",
                        column: x => x.StationId,
                        principalTable: "fee_Station",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_fileAttach",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(maxLength: 128, nullable: true),
                    SystemPath = table.Column<string>(maxLength: 256, nullable: true),
                    CreateTime = table.Column<DateTimeOffset>(nullable: false),
                    UploadUserId = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_fileAttach", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_fileAttach_member_user_UploadUserId",
                        column: x => x.UploadUserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "member_user_claim",
                columns: table => new
                {
                    Id = table.Column<int>(maxLength: 36, nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    UserId = table.Column<string>(nullable: false),
                    ClaimType = table.Column<string>(nullable: true),
                    ClaimValue = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_user_claim", x => x.Id);
                    table.ForeignKey(
                        name: "FK_member_user_claim_member_user_UserId",
                        column: x => x.UserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "member_user_login",
                columns: table => new
                {
                    LoginProvider = table.Column<string>(maxLength: 128, nullable: false),
                    ProviderKey = table.Column<string>(maxLength: 128, nullable: false),
                    ProviderDisplayName = table.Column<string>(maxLength: 512, nullable: true),
                    UserId = table.Column<string>(maxLength: 36, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_user_login", x => new { x.LoginProvider, x.ProviderKey });
                    table.ForeignKey(
                        name: "FK_member_user_login_member_user_UserId",
                        column: x => x.UserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "member_user_role",
                columns: table => new
                {
                    UserId = table.Column<string>(nullable: false),
                    RoleId = table.Column<string>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_user_role", x => new { x.UserId, x.RoleId });
                    table.ForeignKey(
                        name: "FK_member_user_role_member_role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "member_role",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_member_user_role_member_user_UserId",
                        column: x => x.UserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "member_user_token",
                columns: table => new
                {
                    UserId = table.Column<string>(maxLength: 36, nullable: false),
                    LoginProvider = table.Column<string>(maxLength: 128, nullable: false),
                    Name = table.Column<string>(maxLength: 128, nullable: false),
                    Value = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_member_user_token", x => new { x.UserId, x.LoginProvider, x.Name });
                    table.ForeignKey(
                        name: "FK_member_user_token_member_user_UserId",
                        column: x => x.UserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "fee_ConstCostDetail",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    TotalAmount = table.Column<decimal>(nullable: false),
                    Type = table.Column<int>(nullable: false),
                    ConstructionsSetupAmount = table.Column<decimal>(nullable: false),
                    MaterialFee = table.Column<decimal>(nullable: false),
                    VendorMaterialFee = table.Column<decimal>(nullable: false),
                    SecondaryMaterial = table.Column<decimal>(nullable: false),
                    RuleCost = table.Column<decimal>(nullable: false),
                    SafeProduce = table.Column<decimal>(nullable: false),
                    ConstructionCoordination = table.Column<decimal>(nullable: false),
                    ConstructionOccupancy = table.Column<decimal>(nullable: false),
                    SporadicMaterialAndInputInfo = table.Column<decimal>(nullable: false),
                    Supervisor = table.Column<decimal>(nullable: false),
                    Design = table.Column<decimal>(nullable: false),
                    FirstPartyMeterial = table.Column<decimal>(nullable: false),
                    Equipment = table.Column<decimal>(nullable: false),
                    PreConverageDataInput = table.Column<decimal>(nullable: false),
                    MiddleStationJumperDesign = table.Column<decimal>(nullable: false),
                    TransferDataInput = table.Column<decimal>(nullable: false),
                    SupervisorLast = table.Column<decimal>(nullable: false),
                    ConstructionLast = table.Column<decimal>(nullable: false),
                    DesignLast = table.Column<decimal>(nullable: false),
                    ProcessInfo_Number = table.Column<string>(maxLength: 36, nullable: true),
                    ProcessInfo_ConstructionOperator = table.Column<int>(nullable: false),
                    ConstructionTaskId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_ConstCostDetail", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_ConstCostDetail_fee_ConstTask_ConstructionTaskId",
                        column: x => x.ConstructionTaskId,
                        principalTable: "fee_ConstTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_ConstDetail",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    ConstructionType = table.Column<int>(nullable: false),
                    ContractId = table.Column<int>(nullable: true),
                    ContractType = table.Column<int>(nullable: false),
                    SourceConstructionDetailId = table.Column<int>(nullable: true),
                    Operator = table.Column<int>(nullable: false),
                    ProjectId = table.Column<int>(nullable: true),
                    ProcessInfo_Number = table.Column<string>(maxLength: 36, nullable: true),
                    ProcessInfo_ConstructionOperator = table.Column<int>(nullable: false),
                    Status = table.Column<int>(nullable: false),
                    TaskId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_ConstDetail", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_ConstDetail_fee_FwContract_ContractId",
                        column: x => x.ContractId,
                        principalTable: "fee_FwContract",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_ConstDetail_fee_Project_ProjectId",
                        column: x => x.ProjectId,
                        principalTable: "fee_Project",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_ConstDetail_fee_ConstTask_TaskId",
                        column: x => x.TaskId,
                        principalTable: "fee_ConstTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "fee_ConstPlanCost",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Type = table.Column<int>(nullable: false),
                    TotalAmount = table.Column<decimal>(nullable: false),
                    Design = table.Column<decimal>(nullable: false),
                    DesignEffect = table.Column<bool>(nullable: false),
                    Supervisor = table.Column<decimal>(nullable: false),
                    SupervisorEffect = table.Column<bool>(nullable: false),
                    Construction = table.Column<decimal>(nullable: false),
                    ConstructionEffect = table.Column<bool>(nullable: false),
                    FirstPartyMeteria = table.Column<decimal>(nullable: false),
                    ProcessInfo_Number = table.Column<string>(maxLength: 36, nullable: true),
                    ProcessInfo_ConstructionOperator = table.Column<int>(nullable: false),
                    ConstructionTaskId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_ConstPlanCost", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_ConstPlanCost_fee_ConstTask_ConstructionTaskId",
                        column: x => x.ConstructionTaskId,
                        principalTable: "fee_ConstTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "wf_proIns",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    WorkProcessId = table.Column<int>(nullable: true),
                    Status = table.Column<int>(nullable: false),
                    FinishTime = table.Column<DateTimeOffset>(nullable: true),
                    CreateTime = table.Column<DateTimeOffset>(nullable: false, defaultValueSql: "'0001-00-00 00:00:00'"),
                    UserId = table.Column<string>(nullable: true),
                    Number = table.Column<string>(maxLength: 20, nullable: true),
                    Discriminator = table.Column<string>(nullable: false),
                    AuthProjectNumber = table.Column<string>(maxLength: 64, nullable: true),
                    ThirdPartyWorkflowId = table.Column<string>(maxLength: 120, nullable: true),
                    ConstructionTaskId = table.Column<int>(nullable: true),
                    BatchNo = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wf_proIns", x => x.Id);
                    table.ForeignKey(
                        name: "FK_wf_proIns_member_user_UserId",
                        column: x => x.UserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_wf_proIns_wf_WorkProcess_WorkProcessId",
                        column: x => x.WorkProcessId,
                        principalTable: "wf_WorkProcess",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_wf_proIns_fee_ConstTask_ConstructionTaskId",
                        column: x => x.ConstructionTaskId,
                        principalTable: "fee_ConstTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_constructionTaskFileAttach",
                columns: table => new
                {
                    FileId = table.Column<int>(nullable: false),
                    TaskId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_constructionTaskFileAttach", x => new { x.FileId, x.TaskId });
                    table.ForeignKey(
                        name: "FK_fee_constructionTaskFileAttach_fee_fileAttach_FileId",
                        column: x => x.FileId,
                        principalTable: "fee_fileAttach",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_fee_constructionTaskFileAttach_fee_ConstTask_TaskId",
                        column: x => x.TaskId,
                        principalTable: "fee_ConstTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "fee_authProjectFileAttach",
                columns: table => new
                {
                    FileId = table.Column<int>(nullable: false),
                    OrderId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_authProjectFileAttach", x => new { x.FileId, x.OrderId });
                    table.ForeignKey(
                        name: "FK_fee_authProjectFileAttach_fee_fileAttach_FileId",
                        column: x => x.FileId,
                        principalTable: "fee_fileAttach",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_fee_authProjectFileAttach_wf_proIns_OrderId",
                        column: x => x.OrderId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "fee_budgetFileAttach",
                columns: table => new
                {
                    FileId = table.Column<int>(nullable: false),
                    OrderId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_budgetFileAttach", x => new { x.FileId, x.OrderId });
                    table.ForeignKey(
                        name: "FK_fee_budgetFileAttach_fee_fileAttach_FileId",
                        column: x => x.FileId,
                        principalTable: "fee_fileAttach",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_fee_budgetFileAttach_wf_proIns_OrderId",
                        column: x => x.OrderId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "fee_BudgetOrderPlanCost",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Type = table.Column<int>(nullable: false),
                    TotalAmount = table.Column<decimal>(nullable: false),
                    Design = table.Column<decimal>(nullable: false),
                    DesignEffect = table.Column<bool>(nullable: false),
                    Supervisor = table.Column<decimal>(nullable: false),
                    SupervisorEffect = table.Column<bool>(nullable: false),
                    Construction = table.Column<decimal>(nullable: false),
                    ConstructionEffect = table.Column<bool>(nullable: false),
                    FirstPartyMeteria = table.Column<decimal>(nullable: false),
                    BudgetOrderId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_BudgetOrderPlanCost", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_BudgetOrderPlanCost_wf_proIns_BudgetOrderId",
                        column: x => x.BudgetOrderId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_DelegateOrderDetail",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    ConstructionType = table.Column<int>(nullable: false),
                    ContractId = table.Column<int>(nullable: true),
                    ContractType = table.Column<int>(nullable: false),
                    SourceConstructionDetailId = table.Column<int>(nullable: true),
                    Operator = table.Column<int>(nullable: false),
                    ProjectId = table.Column<int>(nullable: true),
                    DelegateOrderBaseId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_DelegateOrderDetail", x => x.Id);
                    table.ForeignKey(
                        name: "FK_contract_fwContract_ID",
                        column: x => x.ContractId,
                        principalTable: "fee_FwContract",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_DelegateOrderDetail_wf_proIns_DelegateOrderBaseId",
                        column: x => x.DelegateOrderBaseId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_delegOrd_Prj_ID",
                        column: x => x.ProjectId,
                        principalTable: "fee_Project",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_FormalOrderPlanCost",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Type = table.Column<int>(nullable: false),
                    TotalAmount = table.Column<decimal>(nullable: false),
                    Design = table.Column<decimal>(nullable: false),
                    DesignEffect = table.Column<bool>(nullable: false),
                    Supervisor = table.Column<decimal>(nullable: false),
                    SupervisorEffect = table.Column<bool>(nullable: false),
                    Construction = table.Column<decimal>(nullable: false),
                    ConstructionEffect = table.Column<bool>(nullable: false),
                    FirstPartyMeteria = table.Column<decimal>(nullable: false),
                    FormalOrderId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_FormalOrderPlanCost", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_FormalOrderPlanCost_wf_proIns_FormalOrderId",
                        column: x => x.FormalOrderId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_stationCostDetail",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    ConstructionTaskId = table.Column<int>(nullable: true),
                    AuthProjectOrderId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_stationCostDetail", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_stationCostDetail_wf_proIns_AuthProjectOrderId",
                        column: x => x.AuthProjectOrderId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_fee_stationCostDetail_fee_ConstTask_ConstructionTaskId",
                        column: x => x.ConstructionTaskId,
                        principalTable: "fee_ConstTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "wf_WorkActivity",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    ProcessInstanceId = table.Column<int>(nullable: true),
                    RoleId = table.Column<string>(nullable: true),
                    WorkTaskId = table.Column<int>(nullable: true),
                    Status = table.Column<int>(nullable: false),
                    DepositUserId = table.Column<string>(nullable: true),
                    DepositTime = table.Column<DateTimeOffset>(nullable: true),
                    CreateTime = table.Column<DateTimeOffset>(nullable: false, defaultValueSql: "'0001-00-00 00:00:00'"),
                    AssignTime = table.Column<DateTimeOffset>(nullable: true),
                    Comment = table.Column<string>(maxLength: 256, nullable: true),
                    TimeSpan = table.Column<DateTime>(rowVersion: true, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wf_WorkActivity", x => x.Id);
                    table.ForeignKey(
                        name: "FK_wf_WorkActivity_member_user_DepositUserId",
                        column: x => x.DepositUserId,
                        principalTable: "member_user",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_wf_WorkActivity_wf_proIns_ProcessInstanceId",
                        column: x => x.ProcessInstanceId,
                        principalTable: "wf_proIns",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_wf_WorkActivity_member_role_RoleId",
                        column: x => x.RoleId,
                        principalTable: "member_role",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_wf_WorkActivity_wf_WorkTask_WorkTaskId",
                        column: x => x.WorkTaskId,
                        principalTable: "wf_WorkTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "fee_AuthProjectOrderCostDetail",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    TotalAmount = table.Column<decimal>(nullable: false),
                    Type = table.Column<int>(nullable: false),
                    ConstructionsSetupAmount = table.Column<decimal>(nullable: false),
                    MaterialFee = table.Column<decimal>(nullable: false),
                    VendorMaterialFee = table.Column<decimal>(nullable: false),
                    SecondaryMaterial = table.Column<decimal>(nullable: false),
                    RuleCost = table.Column<decimal>(nullable: false),
                    SafeProduce = table.Column<decimal>(nullable: false),
                    ConstructionCoordination = table.Column<decimal>(nullable: false),
                    ConstructionOccupancy = table.Column<decimal>(nullable: false),
                    SporadicMaterialAndInputInfo = table.Column<decimal>(nullable: false),
                    Supervisor = table.Column<decimal>(nullable: false),
                    Design = table.Column<decimal>(nullable: false),
                    FirstPartyMeterial = table.Column<decimal>(nullable: false),
                    Equipment = table.Column<decimal>(nullable: false),
                    PreConverageDataInput = table.Column<decimal>(nullable: false),
                    MiddleStationJumperDesign = table.Column<decimal>(nullable: false),
                    TransferDataInput = table.Column<decimal>(nullable: false),
                    StationCostDetailId = table.Column<int>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_fee_AuthProjectOrderCostDetail", x => x.Id);
                    table.ForeignKey(
                        name: "FK_fee_AuthProjectOrderCostDetail_fee_stationCostDetail_Station~",
                        column: x => x.StationCostDetailId,
                        principalTable: "fee_stationCostDetail",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateIndex(
                name: "IX_fee_authProjectFileAttach_OrderId",
                table: "fee_authProjectFileAttach",
                column: "OrderId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_AuthProjectOrderCostDetail_StationCostDetailId",
                table: "fee_AuthProjectOrderCostDetail",
                column: "StationCostDetailId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_budgetFileAttach_OrderId",
                table: "fee_budgetFileAttach",
                column: "OrderId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_BudgetOrderPlanCost_BudgetOrderId",
                table: "fee_BudgetOrderPlanCost",
                column: "BudgetOrderId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_ConstCostDetail_ConstructionTaskId",
                table: "fee_ConstCostDetail",
                column: "ConstructionTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_ConstDetail_ContractId",
                table: "fee_ConstDetail",
                column: "ContractId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_ConstDetail_ProjectId",
                table: "fee_ConstDetail",
                column: "ProjectId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_ConstDetail_TaskId",
                table: "fee_ConstDetail",
                column: "TaskId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_ConstPlanCost_ConstructionTaskId",
                table: "fee_ConstPlanCost",
                column: "ConstructionTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_constructionTaskFileAttach_TaskId",
                table: "fee_constructionTaskFileAttach",
                column: "TaskId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_ConstTask_StationId",
                table: "fee_ConstTask",
                column: "StationId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_DelegateOrderDetail_ContractId",
                table: "fee_DelegateOrderDetail",
                column: "ContractId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_DelegateOrderDetail_DelegateOrderBaseId",
                table: "fee_DelegateOrderDetail",
                column: "DelegateOrderBaseId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_DelegateOrderDetail_ProjectId",
                table: "fee_DelegateOrderDetail",
                column: "ProjectId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_fileAttach_UploadUserId",
                table: "fee_fileAttach",
                column: "UploadUserId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_FormalOrderPlanCost_FormalOrderId",
                table: "fee_FormalOrderPlanCost",
                column: "FormalOrderId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_FwContract_No",
                table: "fee_FwContract",
                column: "No");

            migrationBuilder.CreateIndex(
                name: "IX_fee_FwContract_VendorId",
                table: "fee_FwContract",
                column: "VendorId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_OrderContract_FrameworkContractId",
                table: "fee_OrderContract",
                column: "FrameworkContractId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_OrderContract_ProjectId",
                table: "fee_OrderContract",
                column: "ProjectId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_OrderContract_VendorId",
                table: "fee_OrderContract",
                column: "VendorId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_Project_No",
                table: "fee_Project",
                column: "No");

            migrationBuilder.CreateIndex(
                name: "IX_fee_Station_Code",
                table: "fee_Station",
                column: "Code");

            migrationBuilder.CreateIndex(
                name: "IX_fee_Station_DistrictId",
                table: "fee_Station",
                column: "DistrictId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_Station_OrderDistrictId",
                table: "fee_Station",
                column: "OrderDistrictId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_stationCostDetail_AuthProjectOrderId",
                table: "fee_stationCostDetail",
                column: "AuthProjectOrderId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_stationCostDetail_ConstructionTaskId",
                table: "fee_stationCostDetail",
                column: "ConstructionTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_Vendor_Name",
                table: "fee_Vendor",
                column: "Name");

            migrationBuilder.CreateIndex(
                name: "IX_fee_vendorMatcher_DistrictId",
                table: "fee_vendorMatcher",
                column: "DistrictId");

            migrationBuilder.CreateIndex(
                name: "IX_fee_vendorMatcher_VendorId",
                table: "fee_vendorMatcher",
                column: "VendorId");

            migrationBuilder.CreateIndex(
                name: "RoleNameIndex",
                table: "member_role",
                column: "NormalizedName",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_member_role_claim_RoleId",
                table: "member_role_claim",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_member_user_DistrictId",
                table: "member_user",
                column: "DistrictId");

            migrationBuilder.CreateIndex(
                name: "EmailIndex",
                table: "member_user",
                column: "NormalizedEmail");

            migrationBuilder.CreateIndex(
                name: "UserNameIndex",
                table: "member_user",
                column: "NormalizedUserName",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_member_user_VendorId",
                table: "member_user",
                column: "VendorId");

            migrationBuilder.CreateIndex(
                name: "IX_member_user_claim_UserId",
                table: "member_user_claim",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_member_user_login_UserId",
                table: "member_user_login",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_member_user_role_RoleId",
                table: "member_user_role",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_proIns_Number",
                table: "wf_proIns",
                column: "Number");

            migrationBuilder.CreateIndex(
                name: "IX_wf_proIns_UserId",
                table: "wf_proIns",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_proIns_WorkProcessId",
                table: "wf_proIns",
                column: "WorkProcessId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_proIns_ConstructionTaskId",
                table: "wf_proIns",
                column: "ConstructionTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkActivity_DepositUserId",
                table: "wf_WorkActivity",
                column: "DepositUserId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkActivity_ProcessInstanceId",
                table: "wf_WorkActivity",
                column: "ProcessInstanceId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkActivity_RoleId",
                table: "wf_WorkActivity",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkActivity_WorkTaskId",
                table: "wf_WorkActivity",
                column: "WorkTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkProcess_Name",
                table: "wf_WorkProcess",
                column: "Name",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkTask_RoleId",
                table: "wf_WorkTask",
                column: "RoleId");

            migrationBuilder.CreateIndex(
                name: "IX_wf_WorkTask_WorkProcessId",
                table: "wf_WorkTask",
                column: "WorkProcessId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "fee_authProjectFileAttach");

            migrationBuilder.DropTable(
                name: "fee_AuthProjectOrderCostDetail");

            migrationBuilder.DropTable(
                name: "fee_budgetFileAttach");

            migrationBuilder.DropTable(
                name: "fee_BudgetOrderPlanCost");

            migrationBuilder.DropTable(
                name: "fee_ConstCostDetail");

            migrationBuilder.DropTable(
                name: "fee_ConstDetail");

            migrationBuilder.DropTable(
                name: "fee_ConstPlanCost");

            migrationBuilder.DropTable(
                name: "fee_constructionTaskFileAttach");

            migrationBuilder.DropTable(
                name: "fee_DelegateOrderCostDetail");

            migrationBuilder.DropTable(
                name: "fee_DelegateOrderDetail");

            migrationBuilder.DropTable(
                name: "fee_FormalOrderPlanCost");

            migrationBuilder.DropTable(
                name: "fee_OrderContract");

            migrationBuilder.DropTable(
                name: "fee_ProjectNumberMapping");

            migrationBuilder.DropTable(
                name: "fee_ProjectSetting");

            migrationBuilder.DropTable(
                name: "fee_vendorMatcher");

            migrationBuilder.DropTable(
                name: "member_role_claim");

            migrationBuilder.DropTable(
                name: "member_user_claim");

            migrationBuilder.DropTable(
                name: "member_user_login");

            migrationBuilder.DropTable(
                name: "member_user_role");

            migrationBuilder.DropTable(
                name: "member_user_token");

            migrationBuilder.DropTable(
                name: "wf_WorkActivity");

            migrationBuilder.DropTable(
                name: "fee_stationCostDetail");

            migrationBuilder.DropTable(
                name: "fee_fileAttach");

            migrationBuilder.DropTable(
                name: "fee_FwContract");

            migrationBuilder.DropTable(
                name: "fee_Project");

            migrationBuilder.DropTable(
                name: "wf_WorkTask");

            migrationBuilder.DropTable(
                name: "wf_proIns");

            migrationBuilder.DropTable(
                name: "member_role");

            migrationBuilder.DropTable(
                name: "member_user");

            migrationBuilder.DropTable(
                name: "wf_WorkProcess");

            migrationBuilder.DropTable(
                name: "fee_ConstTask");

            migrationBuilder.DropTable(
                name: "fee_Vendor");

            migrationBuilder.DropTable(
                name: "fee_Station");

            migrationBuilder.DropTable(
                name: "member_District");
        }
    }
}
